
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
#app {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #0b0b0b;
  color: #f5f5f5;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
}

#hud {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  opacity: 0.8;
}

.back-button {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 6;
  background: rgba(225, 225, 225, 0.95);
  color: #111;
  border: 1px solid rgba(20, 20, 20, 0.3);
  padding: 6px 16px;
  transform: translateY(4.0rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  cursor: pointer;
}

#app.room1-hint #controls-hint {
  position: absolute;
  display: inline-block;
  top: 48%;
  left: 50%;
  transform: translate(221%, 3000%);
  text-align: center;
  z-index: 7;
  font-size: 10px;
  letter-spacing: 0.06em;
}

#room-label {
  font-weight: 600;
}

#controls-hint {
  font-size: 11px;
  opacity: 0.7;
  white-space: nowrap;
}

/* Plain text — matches controls-hint tone (no button chrome) */
.go-back-home-link {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.7;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  align-self: flex-start;
}

.go-back-home-link:hover,
.go-back-home-link:focus-visible {
  opacity: 1;
  color: #ffffff;
  outline: none;
}


.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 6, 6, 0.78);
  z-index: 6;
  padding: 24px;
}

.overlay.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.overlay-content {
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 28px 32px;
  max-width:350px;
  width: min(90vw, 350px);
  display: grid;
  gap: 16px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.overlay-content h2 {
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overlay-content p {
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.9;
}

.overlay-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
}

button {
  background: #e1e1e1;
  color: #111;
  border: none;
  padding: 10px 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: #f3f3f3;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

#desk-paper-ui {
  position: absolute;
  left: 50%;
  top: calc(56% - 40px);
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: auto;
}

#desk-paper-ui .paper-action {
  background: rgba(249, 249, 249, 0.96);
  color: #111;
  border: 1px solid rgba(20, 20, 20, 0.25);
  padding: 6px 12px;
  font-family: "Courier New", Courier, "Nimbus Mono PS", monospace;
  letter-spacing: 0.14em;
  font-size: 9px;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

#paper-screen {
  position: absolute;
  inset: 0;
  background: #0b0b0b;
  display: grid;
  place-items: center;
  z-index: 7;
  padding: 24px;
}

#paper-screen .paper-surface {
  position: relative;
  width: min(70vw, 760px);
  height: min(92vh, 1100px);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

#paper-screen .paper-back {
  position: absolute;
  top: 16px;
  left: 16px;
  background: transparent;
  color: #111;
  border: 1px solid rgba(20, 20, 20, 0.35);
  padding: 6px 10px;
  font-family: "Courier New", Courier, "Nimbus Mono PS", monospace;
  letter-spacing: 0.14em;
  font-size: 10px;
  text-transform: uppercase;
}

.blackout {
  background: #000;
  color: #e9e9e9;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 14px;
}

.hint {
  font-size: 12px;
  opacity: 0.7;
}
